#!/bin/bash

ACTION=`zenity --width=200 --height=280 --list --text="Select mode" --title="Modes" --column "I want to..." Mine_monero Mine_monero_low Work Chill Play`

if [ -n "${ACTION}" ];then
 case $ACTION in
 Mine_monero)
 	killall picom &
 	killall glava &
    /home/$USER/Downloads/xmr-stak-rx-linux-1.0.5-cpu/xmr-stak-rx -c /home/$USER/Downloads/xmr-stak-rx-linux-1.0.5-cpu/config.txt -C /home/$USER/Downloads/xmr-stak-rx-linux-1.0.5-cpu/pools.txt --cpu /home/$USER/Downloads/xmr-stak-rx-linux-1.0.5-cpu/cpu.txt&
 	/home/$USER/scripts/modes-scripts/mining/stop-mining.sh && killall xmr-stak-rx && bspc wm -r
  	;;
 Mine_monero_low)
	killall picom &
	killall glava &
	/home/$USER/Downloads/xmr-stak-rx-linux-1.0.5-cpu/xmr-stak-rx -c /home/$USER/Downloads/xmr-stak-rx-linux-1.0.5-cpu/config.txt -C /home/$USER/Downloads/xmr-stak-rx-linux-1.0.5-cpu/pools.txt --cpu /home/$USER/Downloads/xmr-stak-rx-linux-1.0.5-cpu/cpu_low.txt &
	/home/$USER/scripts/modes-scripts/mining/stop-mining.sh && killall xmr-stak-rx && bspc wm -r
 	;;
 Work)
    zenity --info --text "Not yet implemented"
    ;;
 Chill)
    zenity --info --text "Not yet implemented"
    ;;
 Play)
   	zenity --info --text "Not yet implemented"
   	;;
 esac
fi
